#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class Enterprise : Business.BusinessBase<Enterprise, int>
	{
		#region Fields and Properties

		private String departmentCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String DepartmentCode
		{
			get { return departmentCode; }
			set
			{
				if (value != departmentCode)
				{
					MarkChanged("DepartmentCode");
					departmentCode = value;
				}
			}
		}

		private String addPersonCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String AddPersonCode
		{
			get { return addPersonCode; }
			set
			{
				if (value != addPersonCode)
				{
					MarkChanged("AddPersonCode");
					addPersonCode = value;
				}
			}
		}

		private DateTime addDate = DateTime.MinValue;
		/// <summary>
		/// 
		/// </summary>
		public DateTime AddDate
		{
			get { return addDate; }
			set
			{
				if (value != addDate)
				{
					MarkChanged("AddDate");
					addDate = value;
				}
			}
		}

		private String inCharge = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String InCharge
		{
			get { return inCharge; }
			set
			{
				if (value != inCharge)
				{
					MarkChanged("InCharge");
					inCharge = value;
				}
			}
		}

		private String address = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Address
		{
			get { return address; }
			set
			{
				if (value != address)
				{
					MarkChanged("Address");
					address = value;
				}
			}
		}

		private String email = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Email
		{
			get { return email; }
			set
			{
				if (value != email)
				{
					MarkChanged("Email");
					email = value;
				}
			}
		}

		private String phone = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Phone
		{
			get { return phone; }
			set
			{
				if (value != phone)
				{
					MarkChanged("Phone");
					phone = value;
				}
			}
		}

		private Decimal entCaptial = 0.0m;
		/// <summary>
		/// 
		/// </summary>
		public Decimal EntCaptial
		{
			get { return entCaptial; }
			set
			{
				if (value != entCaptial)
				{
					MarkChanged("EntCaptial");
					entCaptial = value;
				}
			}
		}

		private String entCate = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String EntCate
		{
			get { return entCate; }
			set
			{
				if (value != entCate)
				{
					MarkChanged("EntCate");
					entCate = value;
				}
			}
		}

		private String name = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Name
		{
			get { return name; }
			set
			{
				if (value != name)
				{
					MarkChanged("Name");
					name = value;
				}
			}
		}

		private String entCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String EntCode
		{
			get { return entCode; }
			set
			{
				if (value != entCode)
				{
					MarkChanged("EntCode");
					entCode = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public Enterprise()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override Enterprise DataSelect(int id)
		{
			return Services.DALService.EnterpriseService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.EnterpriseService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.EnterpriseService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.EnterpriseService.Delete(this);
		}

		#endregion Base overrides
	}
}
